package com.ding.second.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ding.second.dao.ProductMapper;
import com.ding.second.po.Product;
import com.ding.second.service.ProductServer;

@Service("productServer")
public class ProductServerImpl implements ProductServer{

	@Autowired
	private ProductMapper productMapper;

	@Override
	public List<Product> getProductByInfo(Product product) {
		return productMapper.getProductByInfo(product);
	}

	@Override
	public boolean updateProductState(Map<String, Object> productInfo) {
		return productMapper.updateProductState(productInfo);
	}

	@Override
	public boolean deleteProductById(Map<String, Object> productInfo) {
		return productMapper.deleteProductById(productInfo);
	}

	@Override
	public boolean insertProduct(Product product) {
		return productMapper.insertProduct(product);
	}

	@Override
	public List<Product> getProductsByTerm(Map<String, Object> productInfo) {
		return productMapper.getProductsByTerm(productInfo);
	}

	@Override
	public Product getProductById(String product) {
		return productMapper.getProductById(product);
	}

	@Override
	public List<Map<String, Object>> getProjects(Map<String, Object> productInfo) {
		return productMapper.getProjects(productInfo);
	}
	

}
